import React from 'react';
import { inject, observer } from 'mobx-react';
import * as mobx from 'mobx';
import { getAntd, getEcCom, getLabel } from '../../../util/convert';
import Content from './Content';

@inject('selectNextFlowStore')
@observer
export default class Main extends React.Component {
    render() {
        const { WeaDialog } = getEcCom();
        const { visible, selectNextFlowStore, nodeAttribute } = this.props;
        const { baseParams = {} } = selectNextFlowStore;
        let dialogHeight = nodeAttribute == '1' ? '580px' : '350px';
        return (
            <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@h5ci52`}
              visible={visible}
              loadCss={true}
              initLoadCss={true}
              title={getLabel(384721, '请选择下一节点操作者')}
              icon="icon-coms-workflow"
              iconBgcolor="#0079DE"
              maskClosable={false}
              onCancel={this.doCancel}
              style={{ width: '720px', height: dialogHeight }}
              layout={jQuery('.wf-req')[0]}
            >
                <Content ecId={`${this && this.props && this.props.ecId || ''}_Content@ewn8dx`} {...this.props} />
            </WeaDialog>
        );
    }
    doCancel = () => {
        const { selectNextFlowStore } = this.props;
        selectNextFlowStore.cancelEvent();
    }
}
